package com.xxzx.publicprevention.mapper;

import com.xxzx.publicprevention.pojo.UserDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author liyu
 * @since 2020-10-30
 */
public interface UserMapper extends BaseMapper<UserDO> {

    List<UserDO> getAllUsers();

    UserDO getUser(@Param("id") Integer id);

    UserDO getUserByOpenId(@Param("open_id") String openId);

    UserDO getUserByPhoneNumber(@Param("phone_number") String phoneNumber);

    List<UserDO> getAllUserInOpenIdNotNull();

    List<UserDO> getUserByLocationCity(@Param("location_city") String locationCity);

    List<UserDO> getUserByLocationStreet(@Param("location_street") String locationStreet);

    void addUser(@Param("user") UserDO user);

    void update(@Param("user") UserDO user);

    List<UserDO> uniquenessPhoneVerification(@Param("phone_number") String phoneNumber);

    List<UserDO> getUserByPage(@Param("curr") Integer curr, @Param("size") Integer size);

    int getCount();
}
